<?php
<?php
/**
 * @link http://www.google.com/codesearch/p?hl=pl#_NKtDMG0P6A/classes/fetch/VCDFetch_filmweb.php&q=filmweb%20lang:php&d=2
 */
class Tedi_Service_Filmweb
{	
	protected $_uri;
	protected $_info    = array();
	
	public function __construct($uri)
	{
		$this->_uri = $uri;
	}
	
	public function getTitle()
	{
		$this->_fetchInfo();
		return $this->_info['title'];
	}
	
	public function getOriginalTitle()
	{
		$this->_fetchInfo();
		return $this->_info['original_title'];
	}
	
	public function getDescription()
	{
		$this->_fetchInfo();
		return $this->_info['description'];
	}
	
	public function getYear()
	{
		$this->_fetchInfo();
		return $this->_info['year'];
	}
	
	public function getRate()
	{
		// funkcja powinna zwracac % a nie wartosc bo moze byc 7.2 / 10 albo w innym serwisie 4.5 / 5
		$this->_fetchInfo();
		return $this->_info['rate'];
	}
	
	public function getWorldPremiereDate()
	{
		$this->_fetchInfo();
		return $this->_info['world_premiere'];
	}
	
	public function getPolishPremiereDate()
	{
		$this->_fetchInfo();
		return $this->_info['polish_premiere'];
	}
	
	protected function _fetchInfo()
	{
		if(!empty($this->_info))
		{
			return $this->_info;
		}
		
		require_once 'Zend/Http/Client.php';
		
		$client = new Zend_Http_Client($this->_uri);
		
		$html = $client->request()->getBody();
	}
	
	
}


	
}